Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(users): Create config for TOTP Issuer #4776

Merged
merged 8 commits into from
Jun 3, 2024

Conversation

ThisIsMani
Copy link
Contributor

@ThisIsMani ThisIsMani commented May 27, 2024

Type of Change

  • Bugfix
  • New feature
  • Enhancement
  • Refactoring
  • Dependency updates
  • Documentation
  • CI/CD

Description

This PR adds configs for TOTP Issuer (to easily change issuer name of TOTP)

Additional Changes

  • This PR modifies the API contract
  • This PR modifies the database schema
  • This PR modifies application configuration/environment variables
  1. config/config.example.toml
  2. config/deployments/integration_test.toml
  3. config/deployments/production.toml
  4. config/deployments/sandbox.toml
  5. config/development.toml
  6. config/docker_compose.toml
  7. loadtest/config/development.toml

Motivation and Context

Closes #4775.

How did you test it?

curl --location 'http://localhost:8080/user/2fa/totp/begin' \
--header 'Authorization: Bearer SPT with Purpose as TOTP' \
{
    "secret": {
        "secret": "INY6LEAFGX3OWJFVBXBUM7OMH4KLNI76",
        "totp_url": "otpauth://totp/Hyper:mani.dchandra%40juspay.in?secret=INY6LEAFGX3OWJFVBXBUM7OMH4KLNI76&issuer=Hyper"
    }
}

The totp_url field in the above response contains issuer as Hyper and this is coming from config.

  • In integ, issuer name will be: Hyperswitch Integ
  • In sandbox, issuer name will be: Hyperswitch Sandbox
  • In production, issuer name will be: Hyperswitch Prod
  • In local, issuer name will be: Hyperswitch Deb

Checklist

  • I formatted the code cargo +nightly fmt --all
  • I addressed lints thrown by cargo clippy
  • I reviewed the submitted code
  • I added unit tests for my changes where possible

@ThisIsMani ThisIsMani added C-feature Category: Feature request or enhancement S-waiting-on-review Status: This PR has been implemented and needs to be reviewed A-users Area: Users labels May 27, 2024
@ThisIsMani ThisIsMani self-assigned this May 27, 2024
@ThisIsMani ThisIsMani requested review from a team as code owners May 27, 2024 09:50
Copy link
Contributor

@racnan racnan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need for force_two_factor_auth till we remove support for old apis.

@ThisIsMani ThisIsMani requested a review from racnan May 30, 2024 15:06
@ThisIsMani ThisIsMani changed the title feat(users): Create config for TOTP Issuer and Force TOTP feat(users): Create config for TOTP Issuer May 30, 2024
apoorvdixit88
apoorvdixit88 previously approved these changes Jun 3, 2024
Copy link
Contributor

@apoorvdixit88 apoorvdixit88 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Gnanasundari24 Gnanasundari24 added this pull request to the merge queue Jun 3, 2024
Merged via the queue into main with commit 0cbb292 Jun 3, 2024
10 checks passed
@Gnanasundari24 Gnanasundari24 deleted the config-for-totp-issuer branch June 3, 2024 14:07
pixincreate added a commit that referenced this pull request Jun 4, 2024
…atus_pt

* 'main' of github.com:juspay/hyperswitch:
  chore(version): 2024.06.04.0
  fix: include client_version and client_source in retried payments (#4826)
  refactor(users): Changes for Home and Signout APIs for TOTP Redis flows (#4851)
  feat(users): Create config for TOTP Issuer (#4776)
  feat(multitenancy): add support for multitenancy and handle the same in router, producer, consumer, drainer and analytics (#4630)
  feat(connector): [AUTHORIZEDOTNET] Support payment_method_id in recurring mandate payment (#4841)
  refactor(connector): airwallex convert init payment to preprocessing (#4842)
  feat(router): send `three_ds_requestor_url` in authentication_response for external 3ds flow (#4828)
  feat(consolidated-kafka-events): add consolidated kafka payment events (#4798)
  refactor(connector): [Klarna] Add shipping Address in Klarna Session and Payment Request (#4836)
  fix(connector): make few fields optional in struct NetceteraErrorDetails (#4827)
  chore(cypress): remove logs that expose `globalState` (#4844)
pixincreate added a commit that referenced this pull request Jun 4, 2024
* 'main' of github.com:juspay/hyperswitch:
  feat(cypress): Add service level testing for Payouts (#4744)
  feat(auth): Create and use `SinglePurposeOrLoginTokenAuth` (#4830)
  refactor(connector): [Adyen] handle redirection error response (#4862)
  refactor(api_models): rename Card struct for payouts to avoid overrides in auto generated open API spec (#4861)
  chore(version): 2024.06.04.1
  fix(connector): [Adyen]add required fields for afterpay clearpay (#4858)
  chore(version): 2024.06.04.0
  fix: include client_version and client_source in retried payments (#4826)
  refactor(users): Changes for Home and Signout APIs for TOTP Redis flows (#4851)
  feat(users): Create config for TOTP Issuer (#4776)
  feat(multitenancy): add support for multitenancy and handle the same in router, producer, consumer, drainer and analytics (#4630)
  feat(connector): [AUTHORIZEDOTNET] Support payment_method_id in recurring mandate payment (#4841)
  refactor(connector): airwallex convert init payment to preprocessing (#4842)
  feat(router): send `three_ds_requestor_url` in authentication_response for external 3ds flow (#4828)
  feat(consolidated-kafka-events): add consolidated kafka payment events (#4798)
@SanchithHegde SanchithHegde removed the S-waiting-on-review Status: This PR has been implemented and needs to be reviewed label Jun 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-users Area: Users C-feature Category: Feature request or enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

fix: Ability to change TOTP issuer name depending on the env
5 participants